<template>
  <div class="justify-center container-row" ref="el">
    <div class="justify-center inner">
      <q-img src="@/assets/images/poster.webp" no-native-menu style="width: 100%">
      </q-img>

      <div class="align-content">
        <div class="desc">
          <h2>Product Customization</h2>
          <q-btn no-caps outline rounded color="black" label="Explore All" size="17px" padding="15px" style="border-radius: 30px; font-weight: 800" @click="goto"/>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang='ts'>
import {defineProps, defineEmits, defineExpose} from 'vue'
import {useRouter} from "vue-router";
import {appStore} from "@/store/app";

const router = useRouter()
const store = appStore()

defineProps({
  title: {
    type: String,
    request: true
  },
  rightTitle: {
    type: String,
    default: () => ""
  }
})

const goto = () => {
  const productCustomization = store.category && store.category.main.find(item => item.name === "Product Customization");
  console.log(productCustomization.id)
  router.push(`/pc/category/${productCustomization.id}`);
}


const emit = defineEmits([])

defineExpose({})
</script>

<style scoped lang='less'>
.container-row{
  background-color: #e1e0d7;
  margin-top: 135px;
  margin-left: 40px;
  margin-right: 40px;
  border-radius: 10px;
  min-width: unset;
}
.inner{
  padding: 0 50px;
}

.align-content{
  margin: auto;
  align-items: center;
  justify-content: center;
  text-align: center;
  .desc{
    padding: 80px 0;
    h2{
      margin: 38px 0;
      font-weight: 800;
      font-size: 56px;
    }
    .q-btn{
      width: 30%;
    }
  }
}

</style>